package com.ruoyi.repair.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.repair.mapper.TWorkPartMapper;
import com.ruoyi.repair.domain.TWorkPart;
import com.ruoyi.repair.service.ITWorkPartService;

/**
 * 维修用料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TWorkPartServiceImpl implements ITWorkPartService 
{
    @Autowired
    private TWorkPartMapper tWorkPartMapper;

    /**
     * 查询维修用料
     * 
     * @param id 维修用料主键
     * @return 维修用料
     */
    @Override
    public TWorkPart selectTWorkPartById(Long id)
    {
        return tWorkPartMapper.selectTWorkPartById(id);
    }

    /**
     * 查询维修用料列表
     * 
     * @param tWorkPart 维修用料
     * @return 维修用料
     */
    @Override
    public List<TWorkPart> selectTWorkPartList(TWorkPart tWorkPart)
    {
        return tWorkPartMapper.selectTWorkPartList(tWorkPart);
    }

    /**
     * 新增维修用料
     * 
     * @param tWorkPart 维修用料
     * @return 结果
     */
    @Override
    public int insertTWorkPart(TWorkPart tWorkPart)
    {
        return tWorkPartMapper.insertTWorkPart(tWorkPart);
    }

    /**
     * 修改维修用料
     * 
     * @param tWorkPart 维修用料
     * @return 结果
     */
    @Override
    public int updateTWorkPart(TWorkPart tWorkPart)
    {
        return tWorkPartMapper.updateTWorkPart(tWorkPart);
    }

    /**
     * 批量删除维修用料
     * 
     * @param ids 需要删除的维修用料主键
     * @return 结果
     */
    @Override
    public int deleteTWorkPartByIds(Long[] ids)
    {
        return tWorkPartMapper.deleteTWorkPartByIds(ids);
    }

    /**
     * 删除维修用料信息
     * 
     * @param id 维修用料主键
     * @return 结果
     */
    @Override
    public int deleteTWorkPartById(Long id)
    {
        return tWorkPartMapper.deleteTWorkPartById(id);
    }
}